home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / LCLINT2.SPK / test / test_b / c / null5 < prev    next >
Text File  |  1996-08-28  |  533b  |  37 lines

  1. extern /*@truenull@*/ bool isnull(/*@null@*/ int *x);
  2. extern /*@falsenull@*/ bool notnull(/*@null@*/ int *x);
  3. extern /*@falsenull@*/ char badnull (/*@null@*/ int *x);
  4. extern /*@falsenull@*/ bool worsenull (/*@null@*/ int *x, int t);
  5.  
  6. int g1 (/*@null@*/ int *y)
  7. {
  8.   if (isnull (y))
  9.     {
  10.       return 0;
  11.     }
  12.  
  13.   return *y;
  14. }
  15.  
  16. int g2 (/*@null@*/ int *y)
  17. {
  18.   if (notnull (y))
  19.     {
  20.       return 0;
  21.     }
  22.   else
  23.     {
  24.       return *y;
  25.     }
  26. }
  27.  
  28. int g3 (/*@null@*/ int *y)
  29. {
  30.   if (notnull (y))
  31.     {
  32.       return 0;
  33.     }
  34.  
  35.   return *y;
  36. }
  37.